<% layout('/layout/default.html', {title: '流程文件部署', libs: ['validate','icheck']}){ %>
<div class="main-content">
	<div class="card-header">
		<i class="fa fa-sitemap"></i> 流程文件部署
	</div>
	<form id="inputForm" enctype="multipart/form-data" action="${ctx}/act/process/deploy" method="post" class="form-horizontal">
		<div class="card-body">
			<div class="row">
				<div class="col-sm-12 col-xs-12">
					<div class="form-group row">
						<label class="col-form-label col-sm-2 text-right" for="category" title="类型">
							<span class="required" style="color:red;" >*</span> 类型:<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<#form:select path="category" name="label" data="getDictList:act_category" class="form-control select2bs4 required" />
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-12 col-xs-12">
					<div class="form-group row">
						<label class="col-form-label col-sm-2 text-right" for="file" title="流程文件">
							<span class="required" style="color:red;" >*</span> 流程文件:<i class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<input type="file" id="file" name="file" class="required"/>
							<span class="help-inline">支持文件格式：zip、bar、bpmn、bpmn20.xml</span>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="box-footer">
			<div class="row">
				<div class="offset-md-2 col-md-10">
					<% if (hasPermi('act:process:edit')){ %>
					<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> 执行部署</button>
					<% } %>
					<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="window.parent.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭</button>
				</div>
			</div>
		</div>
	</form>
</div>
<% } %>
<script type="text/javascript">
	$("#inputForm").validate({
		submitHandler: function(form){
			js.ajaxSubmitForm($(form), function(data){
				js.showMessage(data.message);
				/* if(data.result == 'true'){
					window.parent.closeCurrentTabPage(window.parent.refreshTab);
				} */
			});
	    }
	});
</script>


